<link rel="stylesheet" href="Libraries/css/menu_style.css" type="text/css" media="screen" />
                 <?php
                    include_once('Configs/database.php');
                    $db = new database();
                    
                ?>
                <div class="art-nav" align="right">
                    
                      <ul class="art-menu">
                        <li></li>
                        <?PHP 
                            //$db->setQuery("select * from NhomChucNang a, ThucHien b where maquyen=".$_SESSION['maquyen']." and a.macn = b.macn  ");
                            $db->setQuery("select * from QuyenChucNang where parent=0 and maquyen='".$_SESSION['nmaquyen']."' order by macn asc ");
                            $mainmenu = $db->fetchAll();
                            
                            while ($rows = mysql_fetch_array($mainmenu)){
                                $macn = $rows['macn'];
                                echo "<li>";
                            
                                echo "<a><span class=\"l\"></span><span class=\"r\"></span><span class=\"t\">".$rows['tencn']."</span></a>";
                                    echo "<ul>";
                                        $sql = "select * from QuyenChucNang where  maquyen='".$_SESSION['nmaquyen']."' and parent=".$macn." order by macn asc";
                                        $db->setQuery($sql);
                                        $submenu = $db->fetchAll();
                                        while($rows = mysql_fetch_array($submenu)){
                                            //$parent = $rows['macn'];
                                            echo "<li><a href=\"".$rows['link']."\">".$rows['tencn']."</a></li>";
                                                $macn = $rows['macn'];
                                                echo "<ul>";
                                                    $sql = "select * from QuyenChucNang where  maquyen='".$_SESSION['nmaquyen']."' and parent=".$macn." order by macn asc";
                                                    $db->setQuery($sql);
                                                    $subsubmenu = $db->fetchAll();
                                                    while($rows = mysql_fetch_array($subsubmenu)){
                                            
                                                        echo "<li><a href=\"".$rows['link']."\">".$rows['tencn']."</a></li>";
                                                    }
                                                echo "</ul>";
                                       }
                                    echo "</ul>";
                                echo "</li>";
                            }
                            
                        ?>
                        
                    </ul>
                   
                  
                  
                </div>
               
